﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" ng-app="chatApp">
<head>
    <title></title>
    <link href="Content/bootstrap-theme.css" rel="stylesheet" />
    <link href="Content/bootstrap.css" rel="stylesheet" />
</head>
<body>

    <div class="container">
        <div class="row clearfix">
            <div class="col-md-12 column">
                <h3>
                    Class Chat
                </h3>
            </div>
        </div>
        <div class="row clearfix" ng-controller="messageController">
            <div class="col-md-4 column">

                



                <div class="form-group">
                    <label for="Message"></label><input type="text" class="form-control" id="message" ng-model="message" />
                </div>


                <button type="submit" class="btn btn-default" ng-click="addMessage()">Submit</button>

            </div>
            <div class="col-md-8 column">
                <div id="showMessage">
                    <table class="table-bordered table-striped">
                        <tr>
                            <th>Name</th>
                            <th>Time Stamp</th>
                            <th>Message</th>
                            
                        </tr>
                        <tr ng-repeat="m in chatArray | orderBy:timesent:reverse">
                            <td>{{m.user}}</td>
                            
                            <td>{{m.timestamp | amCalendar}}</td>
                            <td>{{m.message}}</td>
                            
                        </tr>
                    </table>




                </div>
            </div>
        </div>
    </div>




    <script src="Scripts/angular.js"></script>
    <script src="Scripts/moment.js"></script>
    <script src="Scripts/angular-moment.js"></script>
    
    <script src="Scripts/jquery-2.1.1.js"></script>
    <script src="Scripts/bootstrap.js"></script>

    <script src="script.js"></script>
</body>
</html>
